package com.finalterm.payment.feign;

import com.finalterm.common.result.Result;
import com.finalterm.order.vo.OrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 订单服务Feign客户端
 */
@FeignClient(value = "order-service")
public interface OrderServiceClient {
    
    /**
     * 更新订单支付状态
     */
    @PostMapping("api/order/updatePaymentStatus/{orderNo}")
    Result<Boolean> updatePaymentStatus(@PathVariable("orderNo") String orderNo);
    
    /**
     * 获取订单信息
     */
    @PostMapping("api/order/getByOrderNo/{orderNo}")
    Result<OrderVO> getOrderByOrderNo(@PathVariable("orderNo") String orderNo);
}
